<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/content/mytags.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>数据字典</title>
		<t:resource types="jquery,lhgdialog,easyui" />
	</head>
	<body>
		<div id="dict-layout" class="easyui-layout" fit="true">
			<div data-options="region:'center',split:true,border:false" style="width:60%;">
				<ui:datagrid name="dictList" idField="id" action="dict.do?datagrid" title="数据字典列表">
					<ui:column field="id" title="编码" sortable="false" hidden="true" />
					<ui:column field="dictCode" title="字典代码" sortable="false" query="true" />
					<ui:column field="dictName" title="字典名称" sortable="false" query="true" />
					<ui:column field="opt" title="操作" align="center" />
					<ui:deleteOpt permiCode="system:dict:delete" url="dict.do?delete&id={id}" message="确定要删除数据字典[{dictCode}]吗？" title="删除字典" />
					<ui:funcOpt permiCode="system:dictdata:view" funname="viewDictData({id},{dictCode})" title="查看字典值" />
					<ui:toolbar iconCls="add" permiCode="system:dict:save" title="新增字典" url="dict.do?addorupdate" funname="add" height="140px" />
					<ui:toolbar iconCls="edit" permiCode="system:dict:save" title="编辑字典" url="dict.do?addorupdate" funname="update" height="140px" />
				</ui:datagrid>
			</div>
			<div data-options="region:'east',split:true,collapsed:false" style="width: 40%;">
				<div id="dict-data-list-panel" class="easyui-panel" title="数据字典的值" style="padding: 1px;" data-options="fit:true,border:false">
					
				</div>
			</div>
		</div>
		<script type="text/javascript">
			function viewDictData(id, dictCode) {
				$("#dict-data-list-panel").panel({
					title : '查看数据字典[' + dictCode + ']的字典值',
					href : 'dictData.do?dictDataList&dictId=' + id
				});
			}
		</script>
	</body>
</html>